import request from '@/utils/request'

// 查询作品集列表
export function listPortfolio(query) {
  return request({
    url: '/bussiness/portfolio/list',
    method: 'get',
    params: query
  })
}

// 查询作品集详细
export function getPortfolio(id) {
  return request({
    url: '/bussiness/portfolio/' + id,
    method: 'get'
  })
}

// 新增作品集
export function addPortfolio(data) {
  return request({
    url: '/bussiness/portfolio',
    method: 'post',
    data: data
  })
}

// 修改作品集
export function updatePortfolio(data) {
  return request({
    url: '/bussiness/portfolio',
    method: 'put',
    data: data
  })
}

// 删除作品集
export function delPortfolio(id) {
  return request({
    url: '/bussiness/portfolio/' + id,
    method: 'delete'
  })
}


//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/bussiness/portfolio/moveUpOrDown',
    method: 'put',
    data
  })
}

//置顶 置底
export function pinToTopOrEnd(data) {
  return request({
    url: '/bussiness/portfolio/pinToTopOrEnd',
    method: 'put',
    data
  })
}
